define("wangtai", ["jquery"], function (require, exports, module) {
    "use strict";
    // var dialog = require('artdlg');
    var dialog = require('artdlg_plus');
    window.dialog = dialog;
    // 公共
    var __public = {
        // 固定某个div在顶部
        fixed_nav: function (obj) {
            var top = obj.position().top;
            var pos = obj.css('position');
            var zindex = obj.css('z-index');
            var cssw = obj.innerWidth();
            $(window).scroll(function () {
                var scrolls = $(document).scrollTop();
                if (scrolls > top) {
                    obj.css({
                        'position': 'fixed', 'z-index': '1000', 'top': 0, 'width': cssw
                    });
                    //首页二级菜单
                    $('.subMenuBox').css({
                        'top':80
                    });
                } else {
                    obj.css({
                        'position': pos, 'z-index': zindex, 'top': top
                    });
                    //首页二级菜单
                    $('.subMenuBox').css({
                        'top':120
                    });
                }
            });
        },
        // 操作json数据，只是比jquery的json多了一个随机数，方便IE不缓存数据
        getJSON: function (url, callback) {
            $.getJSON(url + '&random=' + Math.random(), callback)
        },
        // 操作json数据，只是比jquery的json多了一个随机数，方便IE不缓存数据
        getAJAX: function (url, callback) {
            $.ajax(url + '&random=' + Math.random(), callback)
        },
        SplitArrayToInt: function (str) {
            var arr = new Array();
            for (var i = 0; i < str.length; i++) {
                arr[i] = parseInt(str[i]);
            }
            return arr;
        },
        SplitArrayToArray: function (str, splitstr) {
            var arr = new Array();
            var temp = new Array();
            for (var i = 0; i < str.length; i++) {
                temp = str[i].split(splitstr)
                arr[i] = Array(parseInt(temp[0]), temp[1]);
            }
            return arr;
        }
    };
    module.exports = {
        public: __public,
    }
});
